import flux from 'flux';
import gameStore from '../stores/GameStore';


//拿到flux模块里的Dispatcher类
let Dispatcher = flux.Dispatcher;
//用Dispatcher类new一个AppDispatcher对象
let GameDispatcher = new Dispatcher();

GameDispatcher.register(function (action) {
    switch (action.actionType) {
        case 'CHANGE_MODAL_VISIBLE':
            gameStore.changeModalVisible(action.visible);
            gameStore.emitChange();
            break;
    }
});

export default GameDispatcher;


